#ifndef UPanel
#define UPanel
#include "../stdafx.h"
#include "UControl.h"
#include "../UVector.h"

struct RelativeControl
{
	RelativeControl(TControl* control, TRectangle rect);
	TControl* control;
	TRectangle Rectangle;
};


class TPanel: public TControl
{
private:
	std::vector<RelativeControl> Controls;

public:
	TPanel(TRectangle rect);
	TVector Color;

	virtual void Draw();
	int  ControlCount();
	void AddItem(TControl* Item);
	void RemoveItem(int Index);
	void MoveItem(int Index, TRectangle newPos);
	TControl* GetItem(int Index);

	virtual void setFocus(bool focus);
	virtual void setPos(TRectangle rect);
};

#endif
